//
//  YYCollectionControllerExtension.swift
//  YYProject
//
//  Created by 陆文宇 on 2017/9/2.
//  Copyright © 2017年 陆文宇. All rights reserved.
//

import Foundation

extension YYCollectionController {
    
    func yy_defaultCollectionViewLayout() -> UICollectionViewLayout {
        let flowLayout = UICollectionViewFlowLayout()
        flowLayout.headerReferenceSize = CGSize(width: 0, height: 0)
        flowLayout.itemSize = CGSize(width: (screenWidth - 24) / 2, height: (screenWidth - 24) / 2)
        flowLayout.minimumInteritemSpacing = 8
        flowLayout.minimumLineSpacing = 8
        flowLayout.sectionInset = UIEdgeInsets(top: 8, left: 8, bottom: 8, right: 8)
        return yy_createCollectionViewLayout(defaultFlowLayout: flowLayout)
    }
    
    func yy_defaultCollectionViewConfig() {
        
    }
    
}
